$(document).ready(function() {
	var url = "./";
	toPage("#jiafa",url+"plus.html");
	toPage("#jianfa",url+"sub.html");
	toPage("#chengfa",url+"multi.html");
	toPage("#chufa",url+"divi.html");
	toPage("#chengji",url+"scoreline.html");     //跳转成绩统计
	toPage("#zonghe",url+"zonghe.html");
	//toPage("#kaoshi",);      //跳转考试
	toPage("#cuoti",url+"wrong_question.html");
	//toPage("#youxi",);          //跳转游戏
	toPage("#paiming",url+"rank.html");
	toPage("#kaoshi", url+"kaoshi.html");
	//悬停更换图片
	changePic("#jiafa","jia");
	changePic("#jianfa","jianfa");
	changePic("#chengfa","chengfa");
	changePic("#chufa","chufa");
	changePic("#chengji","chengji");
	changePic("#zonghe","zonghe");
	changePic("#kaoshi","kaoshi");
	changePic("#cuoti","cuoti");
	changePic("#youxi","youxi");
	changePic("#paiming","paiming");
});

function toPage(idStr,url){
	$(idStr).click(function(event) {
		window.location.href= url;
	});
}

function changePic(idStr,url){
	$(idStr).mouseover(function(event) {
		$(this).attr('src', 'image/home_1/'+url+'2.png');
	});
	$(idStr).mouseout(function(event) {
		$(this).attr('src', 'image/home_1/'+url+'1.png');
	});
}